package hacker_rank.nov13;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class UtopianTree {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int T = Integer.parseInt(br.readLine());

		for (int i = 0; i < T; i++) {
			int N = Integer.parseInt(br.readLine());
			solve(N);
		}

	}

	private static void solve(int N) {
		int h = 1;

		for (int i = 0; i < N; i++) {
			if ((i & 1) == 0) { // monsoon
				h <<=1;
			} else
				h += 1;
		}
		System.out.println(h);

	}
}
